CREATE OR REPLACE TRIGGER %TRIGGER_NAME%
BEFORE INSERT OR UPDATE OR DELETE ON %TABLE_NAME% 
FOR EACH ROW
DECLARE
    changed timestamp;
    id number;
BEGIN
    changed := SYSDATE;
        
    IF UPDATING OR DELETING THEN
        %HISTORY_TRIGGER%
    END IF;

    
    IF UPDATING OR INSERTING THEN
        SELECT
            %SEQUENCE_NAME%.nextval
        INTO
            :new.%PREFIX%id
        FROM
            dual;
        :new.%PREFIX%created := changed;
    END IF;
END;
